1. Field of the Invention
The present invention relates to a data processing system, and more particularly to a path selection system where multiple channel paths are available for controlling an Input/Output (I/O) device by a host computer.
2. Description of the Prior Art
The present invention finds use in a data processing system such as one produced by International Business Machines Corp. and referred to as an ES/9000. This data processing system is configured to comply with an architecture defined in "IBM System ESA/390 Principles of Operation", SA22-7201.
FIG. 1 will be referred to for describing the existing method of dispatching work to a particular I/O device through multiple channel paths between the I/O device and a host computer in response to I/O instructions executed in host processors.
The data processing system includes a host computer comprised of a host processor which may include one or more Central Processing Units (CPU) 10 and a host memory 11. Host memory 11 is comprised of a main store 12, addressable by program instructions, and a system store 13. System store 13 stores various control data and is only available to various hardware components and microcode of the system and not available to program instructions.
The input/output system includes a plurality of I/O devices 14 which are normally controlled by control units (CU) 15. An I/O controller includes a plurality of channels 16, multichannel communicator buffer (MCB) 17, and one or more Input/Output Processors (IOP) 18. The connection of the I/O system to the host computer is effected and controlled by a bus switch 19 and system control element (SCE) 20.
A basic ES/9000 system can be configured with one host memory 11, CPU 10, SCE 20, bus switch 19, MCB 17, and IOP 18 and channel 16. As depicted in FIG. 1, a system can also be configured with two sides, each with plural CPU's 10 and IOP's 18. The two sides can be made independent of each other or configured into one system. Also indicated by line 21 is the situation where a CU 15 can also communicate with an autonomous system unrelated to that shown in FIG. 1.
In accordance with the ESA/390 architecture, each I/O device is assigned a unique number called a subchannel (SCH) number. There can be as many as 65,536 unique devices assigned. I/O devices 14 are identified by SCH numbers in I/O instructions executed in CPU 10. Each of one or more IOP's 18 has an associated IOP work queue in system store 13. As I/O instructions are executed, the request for I/O work identified by the SCH number of the involved I/O device is stored in the work queue of an IOP. The IOP examines its work queue on a first in first out basis.
Each SCH has associated data in the system store 13 called subchannel control data (SCD). The SCH number stored in the work queue of an IOP identifies the location of the SCD. For purposes of this invention, part of the control data in the SCD includes from one to eight channel path ID's (CHPID). The CHPID identifies a physical path through a channel 16 to the CU 15 and thus I/O device 14. As shown in FIG. 1, and in particular with regard to the CU identified generally at 22, three channel paths are available. The SCD for a device on CU 22 will contain CHPID's 0, 127, and 128. This data is stored in the SCD at the time the system is initialized, and will include a rotation order for examining the status of these channels when an IOP attempts path selection to send the I/O work to a selected channel 16.
Based on anticipated use of the data processing system, certain control data in system store 13 is fixed. For the present invention that includes which IOP work queues may receive the indication of work in the form of a SCH number when an I/O instruction is executed, which of the channels 16 are to be controlled by a particular IOP 18, the CHPID's for a SCH, and the order in which CHPID's are examined for path selection.
When an IOP 18 examines its work queue and identifies work to be performed by the presence of a SCH number, it accesses the SCD of the SCH. The basic function of path selection is to find a non-busy channel designated by the CHPID's. Before doing the path selection, CHPID's are eliminated from the path selection process by examining other control data that indicates the busy/non-busy status of the I/O devices 14 and CU's 15 identified by the SCH number. If these elements are already busy from previous activations, the path selection will be modified.
The IOP will attempt to select the channel which is next in rotation order as designated by the SCD. When an IOP attempts to select a channel, it checks if the channel is busy. If the channel is available, the IOP sends a signal to the channel to do the I/O work. If the channel is busy, the IOP attempts to select the next path in the round robin rotation order. In the case of multiple IOP's, each IOP is assigned a group of channels for which it can test the busy status. If the next path in the rotation order is not part of this IOP's group, the IOP enqueues the I/O work on the work queue of the IOP who has this next channel path as part of its group. When the request gets to the front of this IOP's work queue, the channel path selection process is started again. If all the paths to the device have a busy condition and at least one path has a busy channel, the IOP puts the I/O work at the end of its work queue. When the IOP has serviced all the requests in its queue in front of the requeued request, it again tries to find a free path to the device and the whole channel selection process starts again.
Problems result in systems where there are many channels and high I/O usage. The path selection algorithm outlined above can result in very high IOP activity and bus usage without getting the I/O work requested dispatched to a selected channel. By having to transfer I/O work between IOP work queues and putting this work at the end of the queues, a window where a channel may change from busy to not busy could easily be missed. Only by providing more IOP's at additional cost can this problem be potentially alleviated with the present path selection technique.